const chartOne = {
  title: {
    text: "活跃时段趋势",
    left: 20,
    textStyle: {
      color: "cornflowerblue",
      fontSize: 16,
    },
  },
  grid: {
    left: "5%", // 与容器左侧的距离
    right: "3%", // 与容器右侧的距离
    top: "15%", // 与容器顶部的距离
    bottom: "15%", // 与容器底部的距离
  },
  xAxis: {
    type: "category",
    data: [
      "0:00-3:00",
      "3:00-6:00",
      "6:00-9:00",
      "9:00-12:00",
      "12:00-15:00",
      "15:00-18:00",
      "18:00-21:00",
      "21:00-24:00",
    ],
  },
  yAxis: {
    type: "value",
    axisLine: {
      show: false,
    },
  },
  series: [
    {
      data: [0, 200, 400, 700, 1000, 600, 400, 200],
      type: "line",
      symbol: "none",
      lineStyle: {
        normal: {
          color: "cornflowerblue", //连线颜色
        },
      },
    },
  ],
};
const chartTwo = {
  title: {
    text: "使用频率统计",
    left: 20,
    textStyle: {
      color: "cornflowerblue",
      fontSize: 14,
    },
  },
  xAxis: {
    type: "category",
    data: ["1次", "2-5次", "6-10次", "11-15次", "16-20次", "20次以上"],
  },
  yAxis: {
    type: "value",
    axisLine: {
      show: false,
    },
  },
  series: [
    {
      data: [120, 200, 150, 80, 70, 110],
      type: "bar",
      itemStyle: {
        color: "cornflowerblue",
      },
      barWidth: 40, // 柱形的宽度
      barCategoryGap: "20%", // 柱形的间距
    },
  ],
};

const chartThree = {
  title: {
    text: "地域分布（低优先级）",
    left: 10,
    textStyle: {
      color: "rgba(0, 0, 0, 0.8470588235294118)",
      fontSize: 14,
      fontWeight: "normal",
    },
  },
  // tooltip:{
  //   trigger: "item",
  // },
  series: [
    {
      name: "用户分析",
      type: "map",
      geoIndex: 0,
      data:[
        {
          name: "南海诸岛",
          value: 100,
        },
        {
          name: "北京",
          value: 540
        },
        {
          name: "天津",
          value: 130
        },
        {
          name: "上海",
          value: 400
        },
        {
          name: "重庆",
          value: 750
        },
        {
          name: "河北",
          value: 130
        },
        {
          name: "河南",
          value: 830
        },
        {
          name: "云南",
          value: 110
        },
        {
          name: "辽宁",
          value: 19
        },
        {
          name: "黑龙江",
          value: 150
        },
        {
          name: "湖南",
          value: 690
        },
        {
          name: "安徽",
          value: 60
        },
        {
          name: "山东",
          value: 39
        },
        {
          name: "新疆",
          value: 4
        },
        {
          name: "江苏",
          value: 31
        },
        {
          name: "浙江",
          value: 104
        },
        {
          name: "江西",
          value: 36
        },
        {
          name: "湖北",
          value: 52
        },
        {
          name: "广西",
          value: 33
        },
        {
          name: "甘肃",
          value: 7
        },
        {
          name: "山西",
          value: 5
        },
        {
          name: "内蒙古",
          value: 778
        },
        {
          name: "陕西",
          value: 22
        },
        {
          name: "吉林",
          value: 4
        },
        {
          name: "福建",
          value: 18
        },
        {
          name: "贵州",
          value: 5
        },
        {
          name: "广东",
          value: 98
        },
        {
          name: "青海",
          value: 1
        },
        {
          name: "西藏",
          value: 0
        },
        {
          name: "四川",
          value: 44
        },
        {
          name: "宁夏",
          value: 4
        },
        {
          name: "海南",
          value: 22
        },
        {
          name: "台湾",
          value: 3
        },
        {
          name: "香港",
          value: 5
        },
        {
          name: "澳门",
          value: 555
        }
      ]
    }
  ],
  geo: {
    map: "china",
    itemStyle: {
      normal: {
        borderColor: "rgba(24, 144, 255, 0.5)",
        areaColor: "rgba(24, 144, 255,0.3)",
      },
      emphasis: {
        areaColor: "red",
        shadowOffsetX: 0,
        shadowOffsetY: 0,
        shadowBlur: 20,
        borderWidth: 0,
        shadowColor: "rgba(0, 0, 0, 0.5)",
      },
    },
  },
};

const chartFour = {
  title: {
    text: "手机品牌分布",
    left: "left",
    textStyle: {
      color: "rgba(0, 0, 0, 0.8470588235294118)",
      fontSize: 14,
      fontWeight: "normal",
    },
  },
  tooltip: {
    trigger: "item",
  },
  series: [
    {
      itemStyle: {
        borderRadius: 10,
        borderColor: "#fff",
        borderWidth: 2,
      },
      label: {
        normal: {
          show: true,
          position: "center",
          color: "#4c4a4a",
          formatter: "{total|" + "设备" + "}" + "\n\r" + "{active|200台}",
          rich: {
            total: {
              fontSize: 12,
              fontFamily: "微软雅黑",
              color: "#454c5c",
            },
            active: {
              fontFamily: "微软雅黑",
              fontSize: 28,
              color: "#000",
              lineHeight: 30,
            },
          },
        },
      },
      type: "pie",
      radius: ["40%", "80%"],
      center: ["45%", "48%"],
      data: [
        { value: 1048, name: "苹果", itemStyle: { color: "#4fcb74" } },
        { value: 735, name: "三星", itemStyle: { color: "#37cbcb" } },
        { value: 580, name: "华为", itemStyle: { color: "#fbd438" } },
        { value: 484, name: "小米", itemStyle: { color: "#3ba1ff" } },
        { value: 300, name: "OPPO", itemStyle: { color: "#f2647c" } },
      ],
      emphasis: {
        itemStyle: {
          shadowBlur: 10,
          shadowOffsetX: 0,
          shadowColor: "rgba(0, 0, 0, 0.5)",
        },
      },
    },
  ],
};

const chartFive = {
  tooltip: {
    trigger: "item",
  },
  title: {
    text: "设备类型分布",
    left: "left",
    textStyle: {
      color: "rgba(0, 0, 0, 0.8470588235294118)",
      fontSize: 14,
      fontWeight: "normal",
    },
  },
  //   legend: {
  //     top: "5%",
  //     left: "center",
  //   },
  series: [
    {
      itemStyle: {
        borderRadius: 10,
        borderColor: "#fff",
        borderWidth: 2,
      },
      type: "pie",
      radius: ["40%", "70%"],
      center: ["50%", "45%"],
      avoidLabelOverlap: false,
      label: {
        normal: {
          show: true,
          position: "center",
          color: "#4c4a4a",
          formatter: "{total|" + "总设备数" + "}" + "\n\r" + "{active|6053}",
          rich: {
            total: {
              fontSize: 12,
              fontFamily: "微软雅黑",
              color: "#454c5c",
            },
            active: {
              fontFamily: "微软雅黑",
              fontSize: 28,
              color: "#000",
              lineHeight: 30,
            },
          },
        },
      },
      emphasis: {
        itemStyle: {
          shadowBlur: 10,
          shadowOffsetX: 0,
          shadowColor: "rgba(0, 0, 0, 0.5)",
        },
      },
      labelLine: {
        show: false,
      },
      data: [
        { value: 1048, name: "苹果", itemStyle: { color: "#4fcb74" } },
        { value: 735, name: "三星", itemStyle: { color: "#37cbcb" } },
        { value: 580, name: "华为", itemStyle: { color: "#fbd438" } },
        { value: 484, name: "小米", itemStyle: { color: "#3ba1ff" } },
        { value: 300, name: "OPPO", itemStyle: { color: "#f2647c" } },
      ],
    },
  ],
};

const chartSix = {
  tooltip: {
    trigger: "item",
  },
  title: {
    text: "系统版本分布",
    left: "left",
    textStyle: {
      color: "rgba(0, 0, 0, 0.8470588235294118)",
      fontSize: 14,
      fontWeight: "normal",
    },
  },
  //   legend: {
  //     top: "5%",
  //     left: "center",
  //   },
  series: [
    {
      itemStyle: {
        borderRadius: 10,
        borderColor: "#fff",
        borderWidth: 2,
      },
      name: "Access From",
      type: "pie",
      radius: ["40%", "70%"],
      center: ["50%", "45%"],
      avoidLabelOverlap: false,
      label: {
        show: false,
        position: "center",
      },
      emphasis: {
        itemStyle: {
          shadowBlur: 10,
          shadowOffsetX: 0,
          shadowColor: "rgba(0, 0, 0, 0.5)",
        },
      },
      label: {
        normal: {
          show: true,
          position: "center",
          color: "#4c4a4a",
          formatter: "{total|" + "IOS设备数" + "}" + "\n\r" + "{active|6053}",
          rich: {
            total: {
              fontSize: 12,
              fontFamily: "微软雅黑",
              color: "#454c5c",
            },
            active: {
              fontFamily: "微软雅黑",
              fontSize: 28,
              color: "#000",
              lineHeight: 30,
            },
          },
        },
      },
      data: [
        { value: 1048, name: "苹果", itemStyle: { color: "#4fcb74" } },
        { value: 735, name: "三星", itemStyle: { color: "#37cbcb" } },
        { value: 580, name: "华为", itemStyle: { color: "#fbd438" } },
        { value: 484, name: "小米", itemStyle: { color: "#3ba1ff" } },
        { value: 300, name: "OPPO", itemStyle: { color: "#f2647c" } },
      ],
    },
  ],
};
export { chartOne, chartTwo, chartThree, chartFour, chartFive, chartSix };
